import {getCompanyOpt} from '../api';
export const formItems = [
  {
    label: '栏目页ID',
    name: 'id',
    type: 'input',
    itemProps: {
      disabled: true
    }
  },
  {
    label: '所属企业',
    name: 'company_id',
    type: 'select',
    required: true,
    asyncOptions: {
      api: getCompanyOpt,
      dataField: 'list',
      optionFields: {
        label: 'name',
        value: 'id',
      },
    }
  },
  {
    label: '栏目标题',
    name: 'title',
    value: '',
    type: 'input',
    required: true,
  },
  {
    label: '栏目图标',
    name: 'pic',
    value: [],
    type: 'Uploader',
    required: true,
    itemProps: {
      maxLen: 1
    }
  },
  {
    label: '显示顺序',
    name: 'sort',
    type: 'input-number',
    required: true,
  }
];

export const formItems2Rules = {

};
